package com.xk857.simpleeffect.domain.vo;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;


public class ProjectVO implements Serializable {

    private static final long serialVersionUID = 1L;

    private Integer id;

    private String name;

    private List<Integer> createTime;

    private List<Integer> finishTime;

    private String elaborate;

    private Integer customerId;

    private Integer sort;

    private Integer allCount;

    private Integer yesCount;

    private Integer todayAddCount;

    private Integer todayFinishCount;

    private Integer todayDelayCount;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public LocalDateTime getCreateTime() {
        if (createTime.size() == 5) {
            return LocalDateTime.of(createTime.get(0), createTime.get(1), createTime.get(2), createTime.get(3), createTime.get(4), 0);
        }
        return LocalDateTime.of(createTime.get(0), createTime.get(1), createTime.get(2), createTime.get(3), createTime.get(4), createTime.get(5));
    }


    public void setCreateTime(List<Integer> createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getFinishTime() {
        if (finishTime == null) {
            return LocalDateTime.now();
        }
        if (finishTime.size() == 5) {
            return LocalDateTime.of(finishTime.get(0), finishTime.get(1), finishTime.get(2), finishTime.get(3), finishTime.get(4), 0);
        }
        return LocalDateTime.of(finishTime.get(0), finishTime.get(1), finishTime.get(2), finishTime.get(3), finishTime.get(4), finishTime.get(5));
    }

    public void setFinishTime(List<Integer> finishTime) {
        this.finishTime = finishTime;
    }


    public String getElaborate() {
        return elaborate;
    }

    public void setElaborate(String elaborate) {
        this.elaborate = elaborate;
    }

    public Integer getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Integer customerId) {
        this.customerId = customerId;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Integer getAllCount() {
        return allCount;
    }

    public void setAllCount(Integer allCount) {
        this.allCount = allCount;
    }

    public Integer getYesCount() {
        return yesCount;
    }

    public void setYesCount(Integer yesCount) {
        this.yesCount = yesCount;
    }

    public Integer getTodayAddCount() {
        return todayAddCount;
    }

    public void setTodayAddCount(Integer todayAddCount) {
        this.todayAddCount = todayAddCount;
    }

    public Integer getTodayFinishCount() {
        return todayFinishCount;
    }

    public void setTodayFinishCount(Integer todayFinishCount) {
        this.todayFinishCount = todayFinishCount;
    }

    public Integer getTodayDelayCount() {
        return todayDelayCount;
    }

    public void setTodayDelayCount(Integer todayDelayCount) {
        this.todayDelayCount = todayDelayCount;
    }

    @Override
    public String toString() {
        return "ProjectVO{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", createTime=" + getCreateTime() +
                ", elaborate='" + elaborate + '\'' +
                ", customerId=" + getCustomerId() +
                ", sort=" + sort +
                ", allCount=" + allCount +
                ", yesCount=" + yesCount +
                ", todayAddCount=" + todayAddCount +
                ", todayFinishCount=" + todayFinishCount +
                ", todayDelayCount=" + todayDelayCount +
                '}';
    }
}